//
//  AXFAutoresizeLabelFlow.h
//  AXFEightGroup
//
//  Created by ooops on 12/26/16.
//  Copyright © 2016 ya. All rights reserved.
//

#import <UIKit/UIKit.h>

/** collectionView cell选中的回调 */
typedef void(^selectedHandler)(NSUInteger index,NSString *title);

@interface AXFAutoresizeLabelFlow : UIView
//@property (nonatomic,strong) UICollectionView *collection;


@property (nonatomic,strong) NSArray *titles;


- (instancetype)initWithFrame:(CGRect)frame
                       titles:(NSArray *)titles
              selectedHandler:(selectedHandler)handler;

- (void)insertLabelWithTitle:(NSString *)title
                     atIndex:(NSUInteger)index
                    animated:(BOOL)animated;

- (void)insertLabelsWithTitles:(NSArray *)titles
                     atIndexes:(NSIndexSet *)indexes
                      animated:(BOOL)animated;

- (void)deleteLabelAtIndex:(NSUInteger)index
                  animated:(BOOL)animated;

- (void)deleteLabelsAtIndexes:(NSIndexSet *)indexes
                     animated:(BOOL)animated;

- (void)reloadAllWithTitles:(NSArray *)titles;

@end
